-
Notifications
You must be signed in to change notification settings - Fork 870
[docs] Update ctc_loss function parameters in documentation #7597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added parameters 'norm_by_times' and 'zero_infinity' to ctc_loss function documentation.
|
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7597.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
Correct formatting of the 'zero_infinity' parameter description in the CTC loss documentation.
Add description for zero_infinity parameter in CTCLoss.
Updated the parameter mapping for PyTorch and PaddlePaddle in the CTCLoss documentation, including the addition of the 'zero_infinity' parameter for PaddlePaddle.
...guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CTCLoss.md
Outdated
Show resolved
Hide resolved
…torch_more_args/torch.nn.CTCLoss.md
Removed the 'zero_infinity' parameter description from CTCLoss documentation.
…torch_more_args/torch.nn.functional.ctc_loss.md
|
@SigureMo 请再看下 |
Co-authored-by: Nyakku Shigure <[email protected]>
| - **blank** (int,可选) - 空格标记的 ID 值,其取值范围为 [0, num_classes + 1)。数据类型支持 int32。默认值为 0。 | ||
| - **reduction** (str,可选) - 指定应用于输出结果的计算方式,可选值有:``'none'``, ``'mean'``, ``'sum'``。设置为 ``'mean'`` 时,对 loss 值除以 label_lengths,并返回所得商的均值;设置为 ``'sum'`` 时,返回 loss 值的总和;设置为 ``'none'`` 时,则直接返回输出的 loss 值。默认值为 ``'mean'``。 | ||
| - **norm_by_times** (bool,可选) - 是否根据序列长度对梯度进行正则化。数据类型支持 bool。默认值为 False。 | ||
| - **zero_infinity** (bool,可选) - 如果 ``true``,将 可能 输出无限的 ``loss`` 设置为 ``0``。默认值: False。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
啊……
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
啊?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我感觉我平时写md或者这类文档的时候习惯比较awful()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
会打空格进去特别标注(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds the zero_infinity parameter to Paddle's CTCLoss APIs and removes outdated API difference documentation that incorrectly stated this parameter wasn't supported.
- Added
zero_infinityparameter topaddle.nn.functional.ctc_lossandpaddle.nn.CTCLoss - Removed API difference documentation files that claimed
zero_infinitywas unsupported in Paddle - Updated API documentation in Chinese to reflect the new parameter
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.ctc_loss.md | Removed obsolete API difference documentation since Paddle now supports zero_infinity |
| docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CTCLoss.md | Removed obsolete API difference documentation since Paddle now supports zero_infinity |
| docs/api/paddle/nn/functional/ctc_loss_cn.rst | Added zero_infinity parameter to function signature and parameter documentation |
| docs/api/paddle/nn/CTCLoss_cn.rst | Added zero_infinity parameter to class signature and parameter documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
描述
将
norm_by_times以及zero_infinity同步于ctc_loss函数